import request from '@/config/axios'

export interface RequirementManagePlanVO {
  id: number
  productNumber: string
  productName: string
  componentName: string
  drawingNumber: string
  specification: string
  creatorName: string
  updaterName: string
}

// 查询订单管理-需求管理-需求计划列表
export const getRequirementManagePlanPage = async (params) => {
  return await request.get({ url: `/order/requirement-manage-plan/page`, params })
}

// 查询订单管理-需求管理-需求计划详情
export const getRequirementManagePlan = async (params) => {
  return await request.get({ url: `/order/requirement-manage-plan/get`,params })
}

// 新增订单管理-需求管理-需求计划
export const createRequirementManagePlan = async (data: RequirementManagePlanVO) => {
  return await request.post({ url: `/order/requirement-manage-plan/create`, data })
}

// 修改订单管理-需求管理-需求计划
export const updateRequirementManagePlan = async (data: RequirementManagePlanVO) => {
  return await request.put({ url: `/order/requirement-manage-plan/update`, data })
}

// 删除订单管理-需求管理-需求计划
export const deleteRequirementManagePlan = async (id: number) => {
  return await request.delete({ url: `/order/requirement-manage-plan/delete?id=` + id })
}

// 导出订单管理-需求管理-需求计划 Excel
export const exportRequirementManagePlan = async (params) => {
  return await request.download({ url: `/order/requirement-manage-plan/export-excel`, params })
}

// 导出订单管理-需求管理-需求计划详情 Excel
export const exportRequirementManagePlanDetail = async (params) => {
  return await request.download({ url: `/order/requirement-manage-plan/conf/export-excel`, params })
}
